var e = require('../@babel/runtime/helpers/objectSpread2.js'),
  o = require('../@babel/runtime/helpers/defineProperty.js'),
  a = require('D28B336470B67DCFB4ED5B639AB21B27.js').getPageCtx,
  r = require('1E1DDD9770B67DCF787BB59075001B27.js'),
  t = function (t) {
    var i,
      n = t.linkType,
      c = t.linkParams,
      w =
        ((i = {
          order: { wxUrl: '/packageOrder/pages/orderList/orderList' },
          coupon: { wxUrl: '/pages/coupon/coupon?cameFrom=getCoupon' },
          collect: { wxUrl: '/pages/User/collect/collect' },
          nwePeople: { wxUrl: '/pages/NewUserDetail/NewUserDetail' },
          customize: { wxUrl: '/pages/AutoPage/AutoPage?id=' + c },
          goldAct: { wxUrl: '/packageActive/pages/goldAct/goldAct?id=' + c },
          sign: { wxUrl: '/pages/webview/webview?route=sign' },
          weidou: { wxUrl: '/pages/center/weidouMall/weidouMall' },
          detail: { wxUrl: '/pages/goodsDetail/goodsDetail?goodsId=' + c },
          category: function () {
            return (
              wx.removeStorageSync('cat_keyWord'),
              wx.removeStorageSync('cat_id'),
              wx.setStorageSync('cat_id', c || 0),
              { wxUrl: '/pages/category/category', wxJumpWay: 'switchTab' }
            );
          },
          otherLink: function () {
            var e = c.split(/\#\/|\?/);
            return (
              console.log(e),
              {
                wxUrl: '/pages/webview/webview?route='
                  .concat(e[1], '&_query=')
                  .concat(encodeURIComponent(e[2])),
              }
            );
          },
          luckdraw: {
            wxUrl:
              '/pages/webview/webview?route=Active/luckyDraw&_query='.concat(
                encodeURIComponent('activity_id=' + c),
              ),
          },
          goodsSaleRank: {
            wxUrl:
              '/pages/webview/webview?route=goods/goodsRank&_query='.concat(
                encodeURIComponent('id=' + c),
              ),
          },
        }),
        o(i, 'sign', {
          wxUrl: '/pages/webview/webview?route=sign&_query='.concat(
            encodeURIComponent('id=' + c),
          ),
        }),
        o(i, 'weiwei_home', { wxUrl: '/pages/webview/webview?route=weiwei' }),
        o(i, 'index', { wxUrl: '/pages/index/index', wxJumpWay: 'switchTab' }),
        o(i, 'service', function () {
          a().setData({ showKefuDialog: !0 });
        }),
        o(i, 'shopCart', { wxUrl: '/pages/cart/cart', wxJumpWay: 'switchTab' }),
        o(i, 'home', { wxUrl: '/pages/center/center', wxJumpWay: 'switchTab' }),
        o(i, 'myCoupon', { wxUrl: '/pages/coupon/coupon?cameFrom=couponList' }),
        o(i, 'storeAct', { wxUrl: '/packageActive/pages/activeHub/activeHub' }),
        o(i, 'supplierIn', {
          wxUrl: '/pages/center/merchantEnter/merchantEnter',
        }),
        o(i, 'memberUp', {
          toast: '请通过app【'.concat(r.SHORT_NAME, '】进行后续操作'),
        }),
        o(i, 'balance', {
          wxJumpWay: 'navigateTo',
          wxUrl: '/pages/User/balanceRecharge/balanceRecharge',
        }),
        o(i, 'liveplay', function () {
          var e = wx.getStorageSync('user'),
            o = e.member ? e.member.id : 0,
            a = encodeURIComponent(JSON.stringify({ rid: o }));
          return {
            wxUrl:
              'plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id='
                .concat(c, '&custom_params=')
                .concat(a),
          };
        }),
        o(i, 'kandian', { wxUrl: '/pages/liveHub/liveHub?room_id=' + c }),
        o(i, 'supplierDetail', { wxUrl: '/pages/Store/index/index?sid=' + c }),
        o(i, 'goodsRank', { wxUrl: '/pages/goodsDetail/goodsRank/goodsRank' }),
        i),
      s = 'function' == typeof w[n] ? w[n]() : w[n];
    return e({ wxJumpWay: 'navigateTo' }, s);
  };
module.exports = {
  getJumpOptions: t,
  jumpDo: function (e) {
    var o = t(e);
    o.toast
      ? wx.showToast({ title: o.toast, icon: 'none', duration: 2e3, mask: !0 })
      : o.wxUrl && wx[o.wxJumpWay]({ url: o.wxUrl });
  },
};
